package cn.tedu.weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;

import javax.validation.constraints.*;

@Data
@Getter
public class UserLoginDTO {
    @ApiModelProperty(value = "用户名",required = true,example = "王克晶")
//    @NotNull(message = "用户名不能为null")//不存在
//    @NotEmpty(message = "用户名不能为null")//空串
//    @NotBlank(message = "用户名不能为null")//空串和空格
//    @Size(min = 3,max = 15,message = "用户名长度必须在3-15位之间")//长度
    private String username;
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]{3,15}$",message = "密码只能是中文，字母，数字，下划线，长度在3-15位之间")
    @ApiModelProperty(value = "密码",required = true,example = "123456")
    private String password;
}
